<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="<s:url value='/resources/css/shop/signoutInfo.css'/>" media="all" />
<script type="text/javascript" src="<s:url value='/resources/js/jquery/jquery-1.5.2.min.js'/>"></script> 
<script type="text/javascript">

	var contextpath= "<%=request.getContextPath()%>";
	var tnterval;

	function print(){
		
		var param='?planid=<s:property value="#request.guideAccount.planid" />&placeid=<s:property value="#request.guideAccount.placeid" />';
		var html='<iframe id="printIframe" frameborder="0" scrolling="no" src="'+contextpath+'/shop/queryGuideAccount.do'+param+'"></iframe>';
		$("#printIframe").remove();
		$(".sign").append(html);
		$(".loading").show();
		$("#printIframe").bind('load',function(){
			$("#printIframe").hide();
			$(".loading").hide();
			$(".success").show();
			
			var i=4;
			if(tnterval!=null){
				clearInterval(tnterval);
			}
			tnterval=setInterval(function(){
				$(".time").text(i);
				i--;
			}, 1000);
			time=setTimeout(function(){
				clearInterval(tnterval);
				window.parent.location.href="<s:url value='/shop/intoShop.do?placeid=%{#request.guideAccount.placeid}' />";
			}, 5000); 
		});
	}
</script>
</head>
<body>
<div class="content">

	<div class="headText">旅行团信息</div>
	<div >
		<table border="1px ">
			<thead>
				<tr>
					<td>旅行社</td>
					<td>旅行团</td>
					<td>导游</td>
					<td>购物场所</td>
					<td>出团人数</td>
					<td>购买人数</td>
					<td>总计消费</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td><s:property value="#request.guideAccount.agencyName" /></td>
					<td><s:property value="#request.guideAccount.groupName" /></td>
					<td><s:property value="#request.guideAccount.guideName" /></td>
					<td><s:property value="#request.guideAccount.placeName" /></td>
					<td><s:property value="#request.guideAccount.peopleNum" /></td>
					<td><s:property value="#request.guideAccount.buyPeoNum" /></td>
					<td><s:property value="#request.guideAccount.total" /></td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="sign">
		<button class="bt" onclick="print()"></button>
	</div>
	<div class="success">
		<div class="success_icon"><img alt="" src="<s:url value="/resources/images/shop/guide/success.png" />"></div>
		<div class="success_text" style="">打印成功</div>
		<div class="clr"></div>
		<div class="time">5</div>
		<div class="clr"></div>
	</div>
	<div class="loading">
		<div class="loading_icon"><img alt="" src="<s:url value="/resources/images/shop/shopping/loading.gif" />"></div>
		<div class="loading_text" style="">正在打印</div>
		<div class="clr"></div>
	</div>
</div>
</body>
</html>